﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SchoolInfo.aspx.cs" Inherits="ExamAnalysis.BasicInfo.SchoolInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .x-grid-cell-fullName .x-grid-cell-inner {
            font-family : tahoma, verdana;
            display     : block;
            font-weight : normal;
            font-style  : normal;
            color       : #385F95;
            white-space : normal;
        }
        
        .x-grid-rowbody div {
            margin : 2px 5px 20px 5px !important;
            width  : 99%;
            color  : Gray;
        }
        
        .x-grid-row-expanded td.x-grid-cell{
            border-bottom-width:0px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    
    <asp:LinqDataSource ID="SchoolInfoLinqDataSource" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        TableName="SchoolInfo">
    </asp:LinqDataSource>
    <ext:GridPanel 
            runat="server" 
            ID="SchoolInfoGridPanel" 
            Height="420" 
            Width="600"
            Title="学校信息" 
            Frame="true">
            <Store>
                <ext:Store ID="Store1" runat="server" DataSourceID="SchoolInfoLinqDataSource" >
                    <Model>
                        <ext:Model ID="Model1" runat="server" Name="SchoolInfo" IDProperty="SchoolID">
                            <Fields>
                                    <ext:ModelField Name="SchoolID" />
                                    <ext:ModelField Name="FullName" />
                                    <ext:ModelField Name="AliasName" />
                                    <ext:ModelField Name="Type" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server" >
			    <Columns>                
                    <ext:Column ID="Column1" runat="server" DataIndex="FullName" Text="学校全称"  Width="150">
                    <Editor>
                         <ext:TextField ID="TextField1" runat="server" />
                    </Editor>
                    </ext:Column>
                    <ext:Column ID="Column2" runat="server" DataIndex="AliasName" Text="学校别名"  Width="150" >
                    <Editor>
                         <ext:TextField ID="TextField2" runat="server" />
                    </Editor>
                    </ext:Column>
                    <ext:Column ID="Column3" runat="server" DataIndex="Type" Text="类别"  Width="100" >
                    <Editor>
                         <ext:TextField ID="TextField3" runat="server" />
                    </Editor>
                    </ext:Column>
			    </Columns>
            </ColumnModel>    
            <SelectionModel>
              <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
             </SelectionModel>     
            <BottomBar>
                <ext:Toolbar ID="Toolbar6" runat="server">
                <Items>
                 <ext:Button ID="Button2" Text="添加学校" runat="server" OnDirectClick="AddSchool_Click" />
                 <ext:Button ID="Button3" Text="更改选中学校" runat="server" OnDirectClick="UpdateSchool_Click" />
                 <ext:Button ID="Button4" Text="删除选中学校" runat="server" OnDirectClick="DeleteSchool_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
        </ext:GridPanel>
        <ext:Window 
            ID="FormWindow" 
            runat="server" 
            Title="学校信息编辑" 
            Width="420" 
            Height="300"           
            BodyPadding="10" 
            Resizable="false" 
            Closable="True"
            Layout="Fit" AutoShow="False" HideCollapseTool="False" Hidden="True" HideMode="Visibility">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    DefaultAnchor="-10"
                    Layout="Form">
                    <Items>
                        <ext:TextField 
                            ID="FullName"
                            runat="server" 
                            Name="学校全称" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="学校全称" 
                            />
                        <ext:TextField 
                            ID="AliasName" 
                            runat="server" 
                            Name="学校别名" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="学校别名" 
                            />
                        <ext:TextField 
                            ID="Type" 
                            runat="server" 
                            Name="类别" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="类别" 
                            />                        
                    </Items>
                </ext:FormPanel>
            </Items>
            <BottomBar>
        <ext:Toolbar ID="Toolbar3" runat="server">
                    <Items>
                        <ext:Button ID="Button6" runat="server" Icon="Add" Text="添加" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Add_Click" />
                           </DirectEvents>
                        </ext:Button>      
                         <ext:Button ID="Button7" runat="server" Icon="Accept" Text="更新" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Change_Click" />
                           </DirectEvents>
                        </ext:Button>              
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server" /> 
                    </Items>
                </ext:Toolbar>
            </BottomBar>
        </ext:Window>
</asp:Content>
